home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 8 / IOPROG_8.ISO / soft / sdkplnet / mac / plgsk401.sit / PluginSDK 4.01a / Examples / CharFlipper / Source / CCharFlipperStream.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-09  |  1.0 KB  |  40 lines

  1. #ifndef CCHARFLIPPERSTREAM_H
  2. #define CCHARFLIPPERSTREAM_H
  3.  
  4. #ifndef _NPAPI_H_
  5. #include "npapi.h"
  6. #endif
  7.  
  8. #include "CNetscapeStream.h"
  9. #include "CCharFlipper.h"
  10.  
  11. class CCharFlipperStream : public CNetscapeStream {
  12.     public:
  13.                             CCharFlipperStream(     NPMIMEType type, 
  14.                                                 NPStream* stream, 
  15.                                                 NPBool seekable, 
  16.                                                 uint16 stype,
  17.                                                 CCharFlipper* inController);
  18.         virtual                ~CCharFlipperStream();
  19.         
  20.         // We just use the default behavior for writeready: send as much data
  21.         // as is available.
  22.         
  23.         virtual long        Write( int32 offset, int32 len, void *buffer );
  24.         virtual NPError        Finish( NPError reason );
  25.         
  26.         static NPBool        IsCharFlipperStream( NPStream* stream );
  27.         
  28.     protected:
  29.         virtual int32        ChangeBufferSize( int32 inNewSize );
  30.         virtual int32        AppendData( int32 inLength, void* inBuffer );
  31.     
  32.         static const char*    kCharFlipperType;
  33.         CCharFlipper*        mController;
  34.         
  35.         char*                mBuffer;
  36.         int32                mAllocatedSize;
  37.         int32                mEndOfData;
  38. };
  39.  
  40. #endif